1700
How do I layout expandable columns

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C0")));
		var_Column->PutExpandColumns(L"1,2");
		var_Column->PutDisplayExpandButton(VARIANT_TRUE);
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
	var_Columns->Add(L"C3");
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C4")));
		var_Column1->PutExpandColumns(L"5,6");
		var_Column1->PutDisplayExpandButton(VARIANT_TRUE);
	var_Columns->Add(L"C5");
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C6")));
		var_Column2->PutExpandColumns(L"6,7");
		var_Column2->PutDisplayExpandButton(VARIANT_TRUE);
	var_Columns->Add(L"C7");
spG2antt1->EndUpdate();
spG2antt1->GetColumns()->GetItem("C4")->PutExpanded(VARIANT_FALSE);

1699
Is it possible to display automatically the start/end margins of the bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%1%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaption,"<%=%2%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaptionHAlign,long(18));
	var_Chart->ScrollTo(var_Chart->GetFirstVisibleDate(),long(1));
spG2antt1->GetColumns()->Add(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ToolTip")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"bar <b>a");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,29,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Item 2");
	var_Items->PutCellValue(h,long(1),"bar <b>b");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1698
Is it possible to assign the bar's caption from a hidden column

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%C1%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
spG2antt1->GetColumns()->Add(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ToolTip")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"bar <b>a");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Item 2");
	var_Items->PutCellValue(h,long(1),"bar <b>b");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1697
Is it possible to assign the bar's tooltip from a hidden column

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<%=%C1%>");
spG2antt1->GetColumns()->Add(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ToolTip")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"This is a bit of text that's shown when the cursor hovers the bar on item 1.");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Item 2");
	var_Items->PutCellValue(h,long(1),"This is a bit of text that's shown when the cursor hovers the bar on item 2.");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1696
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Default");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(65536));
spG2antt1->EndUpdate();

1695
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarFrameColor,long(65536));
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Default"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1694
What I need is bars that have a solid color, but with a black frame. How can we do that

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
EXG2ANTTLib::IBarPtr var_Bar = spG2antt1->GetChart()->GetBars()->Add(L"Frame");
	var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
	var_Bar->PutColor(RGB(0,255,0));
	var_Bar->PutDef(EXG2ANTTLib::exBarFrameColor,long(65536));
	var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%C0%>");
	var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	var_Bar->PutHeight(15);
spG2antt1->GetColumns()->Add(L"Frames");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Default"),"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Inside Color");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(255));
	h = var_Items->AddItem("Border Color");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33023));
	h = var_Items->AddItem("Inside/Border Color");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(16711680));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33023));
	h = var_Items->AddItem("Thick-Border");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(4097));
	h = var_Items->AddItem("Thick-Border + Pattern");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(4098));
spG2antt1->EndUpdate();

1693
How can we drag bars from one item to the other

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Members")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
	var_Chart->PutAllowSelectObjects(EXG2ANTTLib::exNoSelectObjects);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
		var_Bar->PutHeight(18);
		var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutColor(RGB(0,128,255));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Member <b>1</b>");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,23,0,00,00).operator DATE(),"T102","<font ;6><fgcolor FFFFFF>Task <b>102</b>");
	var_Items->PutItemBar(h,"T102",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE);
	h = var_Items->AddItem("Member <b>2</b>");
	h = var_Items->AddItem("Member <b>3</b>");
	h = var_Items->AddItem("Member <b>4</b>");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,23,0,00,00).operator DATE(),"T103","<font ;6><fgcolor FFFFFF>Task <b>103</b>");
	var_Items->PutItemBar(h,"T103",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE);
spG2antt1->EndUpdate();

1692
How can I use the exBarBackgroundExt option of the Items.ItemBar property

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(26);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->GetBars()->GetItem("Task")->PutHeight(22);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Border-Top");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"top[3,back=RGB(0,0,0)]");
	h = var_Items->AddItem("Border-Bottom");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"bottom[3,back=RGB(255,0,0)]");
	h = var_Items->AddItem("Border-Left");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"left[6,back=RGB(0,255,0)]");
	h = var_Items->AddItem("Border-Right");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"right[6,back=RGB(0,0,255)]");
	h = var_Items->AddItem("Border-All");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"top[3,back=RGB(0,0,0)],right[3,back=RGB(0,0,255)],bottom[3,back=RGB(255,0,0)],left[3,back=RGB(0,255,0)],client");
	h = var_Items->AddItem("Middle");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(25%,25%,50%,50%),back=RGB(255,0,0)]");
	h = var_Items->AddItem("Horizontal");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(0,50%-2,100%,4),back=RGB(255,0,0)]");
	h = var_Items->AddItem("Vertical");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(50%-2,0,4,100%),back=RGB(255,0,0)]");
	h = var_Items->AddItem("Mixt");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"[[patterncolor=RGB(255,0,0)](none[(4,4,100%-8,100%-8),pattern=0x006,patterncolor=RGB(255,0,0),frame=RGB(255,0,0),framethick])]");
	h = var_Items->AddItem("Misc");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"bottom[50%,pattern=10,frame]");
	h = var_Items->AddItem("Complex");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"left[10%](top[90%,back=RGB(0,0,0)]),top[30%,back=RGB(254,217,102)],client[back=RGB(91,156,212)]");
spG2antt1->EndUpdate();

1691
Does the title of the cell's tooltip supports HTML format

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")));
	var_Column->PutCaption(L"");
	var_Column->PutHTMLCaption(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellToolTip(var_Items->AddItem("tooltip w/h different title"),long(0),_bstr_t("<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the tit") +
"le centered with a different color.");
spG2antt1->EndUpdate();

1690
How do I specify a different title for the cell's tooltip

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")));
	var_Column->PutCaption(L"This is the title");
	var_Column->PutHTMLCaption(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellToolTip(var_Items->AddItem("tooltip w/h different title"),long(0),L"This is bit of text that's shown when the user hovers the cell.");
spG2antt1->EndUpdate();

1689
The cell's tooltip displays the column's caption in its title. How can I get ride of that

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("tooltip w/h caption");
	var_Items->PutCellToolTip(h,long(0),L"This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title.");
	var_Items->PutCellValue(h,long(1),"tooltip no caption");
	var_Items->PutCellToolTip(h,long(1),L"This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title.");
EXG2ANTTLib::IColumnPtr var_Column = spG2antt1->GetColumns()->GetItem("C2");
	var_Column->PutHTMLCaption(var_Column->GetCaption());
	var_Column->PutCaption(L"");
spG2antt1->EndUpdate();

1688
How can I programmatically show the column's filter

// RClick event - Fired when right mouse button is clicked
void OnRClickG2antt1()
{
	// Columns(c).ShowFilter("-1,-1,128,128")
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items ")));
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowFocusItem | EXG2ANTTLib::exShowCheckBox));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
spG2antt1->EndUpdate();

1687
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

// ColumnClick event - Fired after the user clicks on column's header.
void OnColumnClickG2antt1(LPDISPATCH   Column)
{
	// Column.SortOrder = 1
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->PutSortOnClick(EXG2ANTTLib::exDefaultSort);
	spG2antt1->GetColumns()->GetItem("Sort")->PutSortOrder(EXG2ANTTLib::SortAscending);
	spG2antt1->PutSortOnClick(EXG2ANTTLib::exUserSort);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSortOnClick(EXG2ANTTLib::exUserSort);
spG2antt1->GetColumns()->Add(L"Items");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Sort")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Item 1 (3)"),long(1),long(3));
	var_Items->PutCellValue(var_Items->AddItem("Item 2 (1)"),long(1),long(1));
	var_Items->PutCellValue(var_Items->AddItem("Item 3 (2)"),long(1),long(2));
spG2antt1->EndUpdate();

1686
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

// ColumnClick event - Fired after the user clicks on column's header.
void OnColumnClickG2antt1(LPDISPATCH   Column)
{
	// Column.SortOrder = 1
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->SortChildren(0,"Sort",VARIANT_TRUE);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSortOnClick(EXG2ANTTLib::exUserSort);
spG2antt1->GetColumns()->Add(L"Items");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Sort")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Item 1 (3)"),long(1),long(3));
	var_Items->PutCellValue(var_Items->AddItem("Item 2 (1)"),long(1),long(1));
	var_Items->PutCellValue(var_Items->AddItem("Item 3 (2)"),long(1),long(2));
spG2antt1->EndUpdate();

1685
How do I get information about control's events
// Event event - Notifies the application once the control fires an event.
void OnEventG2antt1(long   EventID)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spG2antt1->ExecuteTemplate(L"EventParam(-2)")) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsTransparent | EXG2ANTTLib::exOverlaidBarsOffset));
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutEnableItem(h,VARIANT_FALSE);
	var_Items->PutItemData(h,long(-1));
	h = var_Items->AddItem("Item 2");
	var_Items->PutItemData(h,long(0));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE);
	var_Items->PutItemData(var_Items->AddItem("Item 3"),long(0));
	h = var_Items->AddItem("Item 4");
	var_Items->PutEnableItem(h,VARIANT_FALSE);
	var_Items->PutItemData(h,long(-1));
spG2antt1->EndUpdate();

1684
How can I sort by two-columns, one by date and one by time

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSort(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Index")))->PutFormatColumn(L"1 index ``");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Date")))->PutSortType(EXG2ANTTLib::SortDate);
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Time")));
		var_Column->PutSortType(EXG2ANTTLib::SortTime);
		var_Column->PutFormatColumn(L"time(value)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,10,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,10,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,6,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,8,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,8,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,6,00,00).operator DATE());
spG2antt1->PutLayout(L"multiplesort=\"C1:1 C2:1\"");
spG2antt1->EndUpdate();

1683
I am trying to hide the non-working dates by using the AddNonworkingDate to specify custom non-working dates while NonworkingDays property is 0, but the non-working date is still shown. What can be wrong

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutNonworkingDays(128);
	var_Chart->AddNonworkingDate(COleDateTime(2008,1,7,0,00,00).operator DATE());
	var_Chart->AddNonworkingDate(COleDateTime(2008,1,8,0,00,00).operator DATE());
	var_Chart->AddNonworkingDate(COleDateTime(2008,1,9,0,00,00).operator DATE());
	var_Chart->AddNonworkingDate(COleDateTime(2008,1,10,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1682
How can I display the task's duration, in days, hours and minutes

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(36);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column1->PutFormatColumn(_bstr_t("((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ") +
"? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,148);
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,4,6,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("T1"),"Task",COleDateTime(2009,4,6,2,30,00).operator DATE(),COleDateTime(2009,4,6,12,35,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("T2"),"Task",COleDateTime(2009,4,6,9,00,00).operator DATE(),COleDateTime(2009,4,6,10,10,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1681
Does your control support working half-hour/minutes/seconds

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(36);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
	var_Column1->PutFormatColumn(_bstr_t("((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ") +
"? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,4,6,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,148);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute);
	var_Chart->PutResizeUnitCount(15);
	var_Chart->PutNonworkingHours(15728767);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutShowNonworkingHours(VARIANT_FALSE);
	EXG2ANTTLib::IBarsPtr var_Bars = var_Chart->GetBars();
		var_Bars->Add(L"Task:Split")->PutShortcut(L"Task");
		var_Bars->GetItem("Task")->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutUnitWidth(26);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("T1");
	var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"(weekday(value) in (1,2,3,4,5) and (timeF(value)<\"09:30\"  or timeF(value)>=\"17:30\")) or (weekday(value) in (0,6))");
	var_Items->AddBar(h,"Task",COleDateTime(2009,4,6,10,00,00).operator DATE(),COleDateTime(2009,4,6,12,30,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("T2");
	var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"(weekday(value) in (1,2,3,4,5) and (timeF(value)<\"08:00\"  or timeF(value)>=\"16:00\")) or (weekday(value) in (0,6))");
	var_Items->AddBar(h,"Task",COleDateTime(2009,4,6,9,30,00).operator DATE(),COleDateTime(2009,4,6,10,45,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1680
How can I programmatically move a bar to a specified date-time
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Original");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	h = var_Items->AddItem("Moved");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	_variant_t duration = var_Items->GetItemBar(h,"key",EXG2ANTTLib::exBarDuration);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	var_Items->PutItemBar(h,"key",EXG2ANTTLib::exBarDuration,duration);
spG2antt1->EndUpdate();

1679
How can I programmatically move a bar, with a specified ammount
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Original");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	h = var_Items->AddItem("Moved");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	var_Items->PutItemBar(h,"key",EXG2ANTTLib::exBarMove,long(3));
spG2antt1->EndUpdate();

1678
How can I programmatically move a bar to a specified date-time (auto-adjust spans over a non-working period)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarsPtr var_Bars = var_Chart->GetBars();
		var_Bars->GetItem("Task")->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
		var_Bars->Add(L"Task:Split")->PutShortcut(L"Task");
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Original");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	h = var_Items->AddItem("Moved");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	_variant_t workingCount = var_Items->GetItemBar(h,"key",EXG2ANTTLib::exBarWorkingCount);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	var_Items->PutItemBar(h,"key",EXG2ANTTLib::exBarWorkingCount,workingCount);
spG2antt1->EndUpdate();

1677
How can I programmatically move a bar, with a specified ammount (auto-adjust spans over a non-working period)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarsPtr var_Bars = var_Chart->GetBars();
		var_Bars->GetItem("Task")->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
		var_Bars->Add(L"Task:Split")->PutShortcut(L"Task");
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Original");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	h = var_Items->AddItem("Moved");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	var_Items->PutItemBar(h,"key",EXG2ANTTLib::exBarMove,long(3));
spG2antt1->EndUpdate();

1676
How can I show a secondary curve, line in the control's histogram

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::HistogramViewEnum(EXG2ANTTLib::exHistogramNoGrouping | EXG2ANTTLib::exHistogramAllItems));
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramItems(8);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
	var_Chart->GetLevel(1)->PutLabel("<font ;3><%d%>");
	var_Chart->PutUnitWidth(9);
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->GetItem("Summary");
		var_Bar1->PutHistogramPattern(EXG2ANTTLib::exRoundCurve);
		var_Bar1->PutHistogramColor(RGB(255,0,0));
		var_Bar1->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar1->PutHistogramItems(8);
		var_Bar1->PutHistogramBorderSize(1);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,1);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->PutItemHeight(h,0);
	var_Items->AddBar(h,"Summary",COleDateTime(2005,1,1,0,00,00).operator DATE(),COleDateTime(2005,12,31,0,00,00).operator DATE(),"1",vtMissing);
	var_Items->PutItemBar(h,"1",EXG2ANTTLib::exBarEffort,"(value mod 31) array (1,1,1,2,1,2.5,3,4,5,4,3,2,1,2,2,3,4.5,4,5,6,7,6,1,2,3,1,1,1,2,3,2,2)");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,7,16,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"weekday(value) in (0,6) ? 0.25 : 2");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,18,0,00,00).operator DATE(),COleDateTime(2005,7,21,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"weekday(value) = 1 ? 2.5 : .5");
spG2antt1->EndUpdate();

1675
How can I add an owner-draw bar
// AfterDrawPart event - Occurs right after drawing the part of the control.
void OnAfterDrawPartG2antt1(long   Part,long   hDC,long   X,long   Y,long   Width,long   Height)
{
	OutputDebugStringW( L"AfterDrawPart" );
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"Part" );
	OutputDebugStringW( spG2antt1->GetItems()->GetCellCaption(spG2antt1->GetDrawPartItem(),long(0)) );
	OutputDebugStringW( _bstr_t(spG2antt1->GetDrawPartKey()) );
}

// BeforeDrawPart event - Occurs just before drawing a part of the control.
void OnBeforeDrawPartG2antt1(long   Part,long   hDC,long FAR*   X,long FAR*   Y,long FAR*   Width,long FAR*   Height,BOOL FAR*   Cancel)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	Cancel = VARIANT_TRUE;
	OutputDebugStringW( L"BeforeDrawPart" );
	OutputDebugStringW( L"Part" );
	OutputDebugStringW( spG2antt1->GetItems()->GetCellCaption(spG2antt1->GetDrawPartItem(),long(0)) );
	OutputDebugStringW( _bstr_t(spG2antt1->GetDrawPartKey()) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->GetBars()->Add(L"OwnerDraw");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Draw-Item-Bar-1"),"OwnerDraw",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Draw-Item-Bar-2"),"OwnerDraw",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1674
Is it possible to show a status left or right to the bar (method 2, exBarFrameColor, EBN)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAChABP0IQAAYAQGKIaBoAKBQAGaAoDDYMQyQwAAxDOKsEwsACEIrjKCRShyCYZRrGUQyAKESRAGyTJBlKKodgOLYYSrFcgSIAsEhqGASRZGUBIJ") +
"DEMI4AJPIwxNIDfyNGKWI6gOQKIoSCYlU7IED0fQNGxVF6XaYqYAIRDINQlVzXcQzPYEbRxCKLKppWqIfpuSIBgI=");
	var_Appearance->Add(1,"CP:2 -8 -1 0 0");
	var_Appearance->Add(3,"CP:2 0 -1 0 0");
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Red-Status-Outside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(16777471));
	h = var_Items->AddItem("Blue-Status-Outside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(33488896));
	h = var_Items->AddItem("Red-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(50331903));
	h = var_Items->AddItem("Blue-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(67043328));
spG2antt1->EndUpdate();

1673
Is it possible to show a status left or right to the bar (method 1, exBarBackgroundExt)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Red-Left-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[6,back=RGB(255,0,0)]");
	h = var_Items->AddItem("Blue-Left-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[6,back=RGB(0,0,255)]");
	h = var_Items->AddItem("Red-Right-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"right[6,back=RGB(255,0,0)]");
	h = var_Items->AddItem("Blue-Right-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"right[6,back=RGB(0,0,255)]");
spG2antt1->EndUpdate();

1672
How can I use the ItemBar(exBarBackgroundExt) property for a bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(31);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutGridLineColor(RGB(224,224,224));
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->GetLevel(0)->PutGridLineColor(spG2antt1->GetGridLineColor());
	var_Chart->GetLevel(1)->PutGridLineColor(spG2antt1->GetGridLineColor());
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->GetBars()->GetItem("Task")->PutHeight(21);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Normal");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	h = var_Items->AddItem("Red-Frame-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"[frame=RGB(255,0,0),framethick]");
	h = var_Items->AddItem("LR-Margins");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]");
	h = var_Items->AddItem("LR-Margins (front)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
	h = var_Items->AddItem("LR-Margins (back)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(3));
	h = var_Items->AddItem("TB-Margins");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"top[4,back=RGB(255,0,0)],bottom[4,back=RGB(0,255,0)]");
	h = var_Items->AddItem("TB-Margins");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"top[2,back=RGB(255,0,0)],bottom[2,back=RGB(0,255,0)]");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
	h = var_Items->AddItem("Caption(back)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"client(bottom[14,text=`<sha ;;0><font ;8>background`,align=0x11])");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
	h = var_Items->AddItem("Pattern-Outside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"bottom[10%,pattern=7,frame]");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
	h = var_Items->AddItem("Pattern-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"bottom[7,pattern=3,frame]");
	h = var_Items->AddItem("Pattern-Inside-Caption");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,_bstr_t("top[4](left[4],right[4],client),bottom[4](left[4],right[4],client),left[4],right[4],client(left[75%,text=`<fgcolor FFFFFF>75%`,") +
"align=0x11,pattern=0x001,frame=RGB(255,0,0)])");
	h = var_Items->AddItem("Complex(back)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(3));
	h = var_Items->AddItem("Complex(inside)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])");
spG2antt1->EndUpdate();

1671
How can display seconds

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,17,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exSecond);
	var_Chart->GetLevel(0)->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
	var_Chart->GetLevel(1)->PutFormatLabel(L"(0:=sec(dvalue)) mod 10 ? 0=: : '<c><font ;6>sec<br><b>' + 0=:");
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2008,1,17,0,00,02).operator DATE(),COleDateTime(2008,1,17,0,00,08).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2008,1,17,0,00,05).operator DATE(),COleDateTime(2008,1,17,0,00,15).operator DATE(),vtMissing,vtMissing);

1670
How can I check if an item contains a bar
// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		OutputDebugStringW( L"Count of A: " );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(var_Items->GetFocusItem(),"A",EXG2ANTTLib::exBarsCount)) );
		OutputDebugStringW( L"Count of B: " );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(var_Items->GetFocusItem(),"B",EXG2ANTTLib::exBarsCount)) );
		OutputDebugStringW( L"Count of C: " );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(var_Items->GetFocusItem(),"C",EXG2ANTTLib::exBarsCount)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"B","B");
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"C","C");
spG2antt1->EndUpdate();

1669
How can I connect to a DBF file
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset");
	rs->Open("Select * From foxcode.DBF","Provider=vfpoledb;Data Source=C:\\Program Files\\Microsoft Visual FoxPro 9\\",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->EndUpdate();

1668
How do I get the caption with no HTML format

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("This is a bit of <b>HTML-formatted</b> text");
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
	var_Items->AddItem(var_Items->GetCellCaption(h,long(0)));

1667
How can I change the bar's color based on its length/duration

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Duration")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,6,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%1 >= 4",vtMissing);
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x1));
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyToBars(L"Task");
	var_ConditionalFormat->PutBarColor(RGB(255,0,0));
	var_ConditionalFormat->PutForeColor(var_ConditionalFormat->GetBarColor());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

1666
Is it possible to colorize the bars based on its starting/ending date

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutOnResizeControl(EXG2ANTTLib::OnResizeControlEnum(EXG2ANTTLib::exDisableSplitter | EXG2ANTTLib::exResizeChart));
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->PutVisible(VARIANT_FALSE);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,5,31,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
	var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
	EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
		var_InsideZoomFormat->PutPatternChart(EXG2ANTTLib::exPatternBDiagonal);
		var_InsideZoomFormat->PutPatternColorChart(RGB(255,0,0));
		var_InsideZoomFormat->PutForeColor(var_InsideZoomFormat->GetPatternColorChart());
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
		var_InsideZooms->PutDefaultWidth(18);
		var_InsideZooms->Add(COleDateTime(2005,6,10,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%1 <= #6/10/2005#",vtMissing);
	var_ConditionalFormat->PutApplyToBars(L"Task");
	var_ConditionalFormat->PutBarColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

1665
How can I change the bar's color based on values on the columns

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
EXG2ANTTLib::IConditionalFormatsPtr var_ConditionalFormats = spG2antt1->GetConditionalFormats();
	EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"1",vtMissing);
		var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x1));
		var_ConditionalFormat->PutBold(VARIANT_TRUE);
		var_ConditionalFormat->PutBackColor(RGB(250,250,250));
	EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%1 = 5",vtMissing);
		var_ConditionalFormat1->PutApplyToBars(L"Task");
		var_ConditionalFormat1->PutBarColor(RGB(255,0,0));
		var_ConditionalFormat1->PutForeColor(RGB(255,0,0));
		var_ConditionalFormat1->PutBarOverviewColor(RGB(255,0,0));
	EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat2 = var_ConditionalFormats->Add(L"%1 = 3",vtMissing);
		var_ConditionalFormat2->PutApplyToBars(L"Task");
		var_ConditionalFormat2->PutBarColor(RGB(0,255,0));
		var_ConditionalFormat2->PutForeColor(RGB(0,255,0));
		var_ConditionalFormat2->PutBarOverviewColor(RGB(0,255,0));
spG2antt1->EndUpdate();

1664
How can I display / specify a fixed percent for the task in the histogram, no matter how long the task is

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(32);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutUnitWidth(32);
	var_Chart->PutLevelCount(2);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverAllocation);
		var_Bar->PutShowHistogramValues(L"1");
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"TaskFixed");
		var_Bar1->PutHistogramType(EXG2ANTTLib::HistogramTypeEnum(EXG2ANTTLib::exHistOverAllocationFixed | EXG2ANTTLib::exHistOverAllocation));
		var_Bar1->PutShowHistogramValues(L"1");
	EXG2ANTTLib::IBarPtr var_Bar2 = var_Chart->GetBars()->Copy(L"Task",L"TaskMultiply");
		var_Bar2->PutHistogramType(EXG2ANTTLib::HistogramTypeEnum(EXG2ANTTLib::exHistOverAllocationMultiply | EXG2ANTTLib::exHistOverAllocation));
		var_Bar2->PutShowHistogramValues(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Allocation");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,23,0,00,00).operator DATE(),"A","Effort/Length");
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarEffort,double(0.25));
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarVAlignCaption,long(18));
	var_Items->AddBar(h,"TaskFixed",COleDateTime(2005,6,24,0,00,00).operator DATE(),COleDateTime(2005,6,26,0,00,00).operator DATE(),"B","Effort");
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarEffort,double(0.25));
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarVAlignCaption,long(18));
	var_Items->AddBar(h,"TaskMultiply",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,6,29,0,00,00).operator DATE(),"C","Effort*Length");
	var_Items->PutItemBar(h,"C",EXG2ANTTLib::exBarEffort,double(0.25));
	var_Items->PutItemBar(h,"C",EXG2ANTTLib::exBarVAlignCaption,long(18));
spG2antt1->EndUpdate();

1663
Does your control supports scrolling by touching the screen

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->PutContinueColumnScroll(VARIANT_TRUE);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->GetChart()->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
spG2antt1->PutAutoDrag(EXG2ANTTLib::AutoDragEnum(EXG2ANTTLib::exAutoDragScrollOnShortTouch | EXG2ANTTLib::exAutoDragScroll));
spG2antt1->EndUpdate();

1662
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (zoom-onfly)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::exZoomOnFly);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutResizeUnitCount(4);
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"<font ;5><b><%h%><br><%AM/PM%></b></font><||>4<||>65536");
	var_Chart->PutZoomOnFlyCaption(L"<br><c><b><font ;12><%=%C0%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"T1","T1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,11,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"T3","T3");
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spG2antt1->EndUpdate();

1661
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (inside-zoom)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
		var_InsideZoomFormat->PutInsideLabel(L"<%hh%>");
		var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exHour);
		var_InsideZoomFormat->PutInsideCount(8);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->EndUpdate();

1660
How can I export the control's content to a PDF document (method 1)
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->PutLevelCount(2);
	var_Chart->PutShowEmptyBars(1);
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2009,1,2,0,00,00).operator DATE(),COleDateTime(2009,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2009,1,4,0,00,00).operator DATE(),COleDateTime(2009,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
	var_Print->CopyTo(L"c:/temp/xtest.pdf");
OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." );
spG2antt1->EndUpdate();

1659
How can I export the control's content to a PDF document (method 2)
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->PutLevelCount(2);
	var_Chart->PutShowEmptyBars(1);
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2009,1,2,0,00,00).operator DATE(),COleDateTime(2009,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2009,1,4,0,00,00).operator DATE(),COleDateTime(2009,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
_variant_t var_CopyTo = spG2antt1->GetCopyTo(L"c:/temp/xtest.pdf");
OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." );
spG2antt1->EndUpdate();

1658
Today date is shown, if we use the Column.FormatColumn and Editor.Option(exDateAllowNullDate) properties. What can be done

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")));
	var_Column->PutFormatColumn(_bstr_t("len(value) ? ( (longdate(date(value)) left 3) + ' ' + day(date(value)) + '/' + month(date(value)) + '/' + (year(date(value)) ri") +
"ght 2) ) : '' )");
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::DateType);
		var_Editor->PutOption(EXG2ANTTLib::exDateAllowNullDate,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(COleDateTime(2012,5,12,0,00,00).operator DATE());
	var_Items->AddItem(vtMissing);
	var_Items->AddItem(COleDateTime(2012,5,14,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1657
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutCellValue(Item,long(2),var_Items->GetCellState(Item,long(0)));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%2 != 0",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutForeColor(RGB(255,0,0));
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToItems);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutWidth(16);
	var_Column->PutAllowSizing(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Information");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Hidden")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(""),long(1),"This is a bit of text associated");
	long h = var_Items->AddItem("");
	var_Items->PutCellValue(h,long(1),"This is a bit of text associated");
	var_Items->PutCellState(h,long(0),1);
	var_Items->PutCellValue(var_Items->AddItem(""),long(1),"This is a bit of text associated");
spG2antt1->EndUpdate();

1656
How can I hide the items/grid section of the control

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutOnResizeControl(EXG2ANTTLib::OnResizeControlEnum(EXG2ANTTLib::exDisableSplitter | EXG2ANTTLib::exResizeChart));
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

1655
How can I draw an extra line which could indicate deadline for my tasks

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(24);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAChABLMIQAAYAQGKIaBoAKBQAGaAoDDQOQ4QwAAxjAKUEwsACEIrjKCYVgOHYYRrIIEvZAAMIlSbCMoxcAsSQSf6YJBmKL4fiWMobRCMQyiLLMd") +
"wiGoYJ4hGgKChqI43RZNErURRkEwCgIA=");
	var_Appearance->Add(1,"CP:2 0 -4 0 4");
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Default");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(16777471));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarFrameColor,long(33488896));
spG2antt1->EndUpdate();

1654
How can I mark/highlight a zone in the control's histogram

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramItems(12);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->GetChart()->MarkTimeZone("zone",COleDateTime(2005,6,13,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),long(15790320),";;;;histogram;1");
spG2antt1->EndUpdate();

1653
How can I get the min/max values from the histogram
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
		OutputDebugStringW( L"Value" );
		OutputDebugStringW( _bstr_t(var_Chart->GetHistogramValue(var_Chart->GetDateFromPoint(-1,-1),vtMissing,vtMissing)) );
		OutputDebugStringW( L"MIN" );
		OutputDebugStringW( _bstr_t(var_Chart->GetHistogramValue("min",vtMissing,vtMissing)) );
		OutputDebugStringW( L"MAX" );
		OutputDebugStringW( _bstr_t(var_Chart->GetHistogramValue("max",vtMissing,vtMissing)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramItems(12);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

1652
How can I assign different efforts(expression) to the same bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramItems(12);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
	var_Chart->GetLevel(1)->PutLabel("<font ;3><%d%>");
	var_Chart->PutUnitWidth(9);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"weekday(value) in (0,6) ? 0.25 : 2");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,18,0,00,00).operator DATE(),COleDateTime(2005,6,21,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"weekday(value) = 1 ? 2 : 1");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,7,9,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"month (value) = 7 ? 1 : 0");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,7,5,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"(month(value)=month(value+1)) ? 1 : 0");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,22,0,00,00).operator DATE(),COleDateTime(2005,6,26,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"int(value-start) ? 1 : 2");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,7,10,0,00,00).operator DATE(),COleDateTime(2005,7,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"(int(value-start) and int(end-value) != 0 ) ? 1 : 2");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,7,15,0,00,00).operator DATE(),COleDateTime(2005,7,22,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"(int(value-start)+1) mod 2 ? 1 : 0");
spG2antt1->EndUpdate();

1651
How can I prevent showing the representation of the bar on the week days, nonworking part

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramItems(12);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,21,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"weekday(value) in (0,6) ? 0 : 2");
spG2antt1->EndUpdate();

1650
How do I programatically focus a cell
// FocusChanged event - Occurs when a cell gets the focus.
void OnFocusChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutCellBackColor(var_Items->GetFocusItem(),spG2antt1->GetFocusColumnIndex(),RGB(255,0,0));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelForeColor(spG2antt1->GetForeColor());
spG2antt1->PutSelBackColor(spG2antt1->GetBackColor());
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Column1");
	var_Columns->Add(L"Column2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Cell 1.1"),long(1),"Cell 1.2");
	var_Items->PutCellValue(var_Items->AddItem("Cell 2.1"),long(1),"Cell 2.2");
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
	var_Items1->PutSelectItem(var_Items1->GetItemByIndex(1),VARIANT_TRUE);
spG2antt1->PutFocusColumnIndex(1);
spG2antt1->EndUpdate();

1649
How do I programatically focus a cell (excrd)
// FocusChanged event - Occurs when a cell gets the focus.
void OnFocusChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutCellBackColor(var_Items->GetFocusItem(),spG2antt1->GetFocusColumnIndex(),RGB(255,0,0));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelForeColor(spG2antt1->GetForeColor());
spG2antt1->PutSelBackColor(spG2antt1->GetBackColor());
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->PutDefaultItemHeight(36);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column1")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column2")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column3")))->PutVisible(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"FormatLevel")));
		var_Column->PutFormatLevel(L"(0/1),2");
		var_Column->PutDef(EXG2ANTTLib::exCellFormatLevel,var_Column->GetFormatLevel());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Cell 1.1");
	var_Items->PutCellValue(h,long(1),"Cell 1.2");
	var_Items->PutCellValue(h,long(2),"Cell 1.3");
	h = var_Items->AddItem("Cell 2.1");
	var_Items->PutCellValue(h,long(1),"Cell 2.2");
	var_Items->PutCellValue(h,long(2),"Cell 2.3");
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
	var_Items1->PutSelectItem(var_Items1->GetItemByIndex(1),VARIANT_TRUE);
spG2antt1->PutFocusColumnIndex(2);
spG2antt1->EndUpdate();

1648
How can I get task's user data ( exBarData ) when user double clicks the bar
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void OnDblClickG2antt1(short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long item = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	_variant_t key = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(item,key,EXG2ANTTLib::exBarData)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarData,"this is a bit of extra data associated with task 1");
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarData,"this is a bit of extra data associated with task 2");
spG2antt1->EndUpdate();

1647
How do I get arranged the levels to display, weeks, days and so on

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutUnitWidth(24);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment);
		var_Level->PutLabel("<b><Font Tahoma;7><%m3%>, <%yyyy%></b><b>, <Font Tahoma;7>Wk <%ww%>");
		var_Level->PutUnit(EXG2ANTTLib::exWeek);
		var_Level->PutDrawGridLines(VARIANT_TRUE);
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutAlignment(EXG2ANTTLib::CenterAlignment);
		var_Level1->PutLabel("<Font Tahoma;7><%d%>");
		var_Level1->PutUnit(EXG2ANTTLib::exDay);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->EndUpdate();

1646
How can I add a task and a milestone to the same item
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Milestone",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"MKey",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);

1645
How can I change the visual appearance of the buttons on the control's overview part

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAADhABdQFg6AADACAxRDAMgBQKAAzQFAYawdBgABoGUZ4JhUAIIRZGMIjFDcEwxC6NIpAWCYQDENQwSSMMJwSKYYBiASEYJASQZUhmHIDTbIEBxf") +
"IMIRLE6PZbmEYYfgeNY6TQCcIgVD0ExhAZ2Q4EQAKRpOFY/DBQNLgAKNCQ3LaQY7BaKgZouTYDVrVNSVFC0IBkGoSbauCIJHrGCZ1RBYMI0VDNRwHJiMbRtSyqXjGJ4p" +
"SrAcq0FAgYRHI6jZxnGL5chqPqGVjMNZ1bQuKwzT0Ld5wTYsdydBK1MIkTKKaoORZgRpYUI6FAeSgBWyPcCqPSoDrKdo4XLdYwbeAFcSPD6+NBhG7tXm/NarNTgTB6DB" +
"thsGJbgYYw9AQVxBoOch2hEbh+nAARYkQdZ7CMPYGH+FxmlqbJ5lqDAdjMC5AmIW54hwaBvA4IQ8D+T8IFscgenAAZMHiEgWiWdRZlSAAhAkFAGq6dAdEcIYVF4QJKCA" +
"HQDBCBJYGUGQNhCEIhiSCJaGAYQWBsIYmEEFgJAGQ42CyC4iliPgygsT4olSXg3g2Qwwk0MpMiMLJIg8Y54niTYOmPPJMDMDIonSSU7jMJJbDaTYjlYUoMmMCRWFQAAl" +
"EkZgtDgTgjgCJQpEoIgkgkIQHnIAB7CACARnIaIaiaGYuG6GxmhmFB7CGSICAyHwoAmQxQlQNIlikWgthYIwaAYVQvAuQpsg0IxIhKTIzCwToTiiaYACkChGhKJJpEOQ" +
"oWC+C5imyCgiggYpUzMZ5Yj6AIfg6UpcjgLYInIPILhOTYaEIUg9EoItfCGCByAiCV2lIKILCGK4qnKO4YggWpQgIJxJmIaJhDgDgKECaIykkUhUhILQLEKRh9iiYpzC" +
"SSQxmgcgkm2NppAKbI8C4RoBiQYgSgSMQQEEEIDjECBDA8LorjKa47EQMQSm4DpEhEKBDBeRgBGqMQnmkA5in4JAJAINoEC6JR4jyaQ6E6AhEhIIxNBMRJPiQCYyHCGA" +
"UgUMQwEgEhhkEOBHBOBJxCMHJHjGXB/CKSBxlENwaj1qgsEwERICIDB/iQDgjgiYYvE2cx8l2KIinoEI5CYSYiFqEAz0mMBZBbwIkEsEN+gMSpSHSTITEqSoEFyGBHCo" +
"SoihqEAsgsIo8ikKhKGiVJ6AADwTkicQlAkUhElA+Z4VUHpHGuRA8lMdI9DscJc8r5QQAaIYsGUOpOjoOwHCEJAUgBh8B1EAAcHIzg5gPCGNgdQfRPhnGiLINhhQEDCB" +
"cGUDYphxjLHkNgfwTARhiHEBYWAVxpI1HQDcDjthiAADoKcCgJgbs7FyG4LQagBBgE0CMOYOxLhtGY/AcAegNgTHIPkHISAHADEQNYOA2BwAHEQHABwQxMDbCQEscoEB" +
"AAgEOD0V4cR0jyGCPAPwHAvh0EAOIHIDRfA/EaGMfYfguAACiBQIg/xWAbH0F8J4bxSD6G8MUMo7Q9ieHuI8eA0gLjfG2PUPQnwvhvHsPsGABxhD8E+AMbgfhVDJH2L8" +
"U48wAjbEGPwPo7x8j4F4FccwHAhhiEgBQEQhAnCDGgHwBonxiAZD+G8Lo/hHj3H8PELIiBwgOFCNQHAqQAhYBWAUIARAECgHyKkIIqAIgGGCLgUIFAhB5CQAcFAGgcEH" +
"HKBwUYkAdiHDgOaAIKBigYCCFAFQhBzChAWKEOYzwDhCEwFMBQNxwD3C8CsPgHQhANEuA4Uw+gdhHDAOwBogRYAzFuGAQIEgQAzCSGUAIbAXAFCiKIGghhBCQAeAFIgD" +
"gwjMByEAAYXg1hiEwFgBYAQugAGIPsTodgnDSBgMca4LhqChCgD4CIYgYBDmcI4GIxgUCYAm1oPIjwgjmFQMYWA1gNCiBUqcII6gegUEAHwB4oRwhzEGLge4GAOC6HUA" +
"cMIsAbCGDqLYHYVBACTAkIIIAYigCIGcBQCArQKiiFQFERQUQhDMAOBgcIWAggUBGIMfAVAHhCBwEgBAMg+jbFqCcHYLxvg4D2A8QI3AziMHiJoUgFhACyCwIINofwHi" +
"JDAJUKw2B2ARGEEAIwCxIh2BaNQQA/ROBRGoFYQ48B/AeEGEt99lQOgDFgGcAtFgdgHEANIMAhAIDKAygkQAEAAjxBeIoCI7QfjUEEEwDIIgWBFEQHUSANxsAqEEEUdw" +
"lA4iJCSFYEwhBsCXE0KoIAexnj4DoDkEwaBmgYCGAwMADAkCFCMMYAQOgMhQEIHsaIVQQDXFOOgRtwAUguAcAUU1iw1CWA6OwdIOQFBxCgCkDgeBribBmIgP4KQiAAB+" +
"KoAg2QNiDDoG0BQyQzg+EGOAWAFgRC4DsEURQYAdhWFKAoKAVQAB/AcHEaAORiioFqBYMWFATCZEsBsIYcA0gMGCJwGAhg4DQAwKsDAYQGzZBkAcSA8gODEBEGQVIQha" +
"jUEeeYKY1QIDrBCIAEg0xIAwEgBNkAAADUTA6B4MQEwv0UEGLAUgzhf04AKGEg4BhYD2B0MUAABApAAvqI8WAqAdDGGwJsEIXwWDtE0AAA4fhmDZCmJMMwbBkgBIC");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);
	var_Chart->PutLabel(EXG2ANTTLib::exSecond,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exYear,L"");
spG2antt1->GetChart()->PutOverviewSelBackColor(0x1ffff00);

1644
Is there a way to show the Start and End dates in mm-dd-yyyy format

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,25,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"K1");
	var_Column->PutFormatColumn(L"(0 array (0:=(shortdateF(value) split `/`))) + `-` + (1 array (=:0) ) + `-` + (2 array (=:0) )");
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"K1");
	var_Column1->PutFormatColumn(L"shortdateF(value) replace `/` with `-`");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem(vtMissing),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem(vtMissing),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
spG2antt1->EndUpdate();

1643
Is there a way to show the Start and End dates in dd-mm-yyyy format

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,25,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"K1");
	var_Column->PutFormatColumn(L"(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )");
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"K1");
	var_Column1->PutFormatColumn(L"(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem(vtMissing),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem(vtMissing),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
spG2antt1->EndUpdate();

1642
If we have bars with dark color, we use white font/color. But if the bars are too small for the caption, you can’t read it. What can we do

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IBarPtr var_Bar = spG2antt1->GetChart()->GetBars()->GetItem("Task");
	var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
	var_Bar->PutHeight(17);
EXG2ANTTLib::IBarPtr var_Bar1 = spG2antt1->GetChart()->GetBars()->GetItem("Progress");
	var_Bar1->PutPattern(EXG2ANTTLib::exPatternSolid);
	var_Bar1->PutHeight(17);
	var_Bar1->PutShape(EXG2ANTTLib::exShapeSolid);
	var_Bar1->PutColor(RGB(0,0,255));
EXG2ANTTLib::IBarPtr var_Bar2 = spG2antt1->GetChart()->GetBars()->Add(L"Task%Progress");
	var_Bar2->PutPattern(EXG2ANTTLib::exPatternSolid);
	var_Bar2->PutHeight(17);
	var_Bar2->PutShortcut(L"Percent");
spG2antt1->PutDefaultItemHeight(21);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(4112616));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF><sha 0;;0>Pause");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"white",vtMissing);
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarColor,long(4112616));
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF>Pause");
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(2017557));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF><sha 0;;0>Production");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"white",vtMissing);
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarColor,long(2017557));
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF>Production");
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Percent",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPercent,double(0.5));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(2017557));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF><sha 0;;0>Pausing");
	var_Items->AddBar(h,"Percent",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"white",vtMissing);
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarPercent,double(0.5));
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarColor,long(2017557));
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF>Pausing");
	h = var_Items->AddItem("Task 4");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(8421504));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF><sha 0;;0>Planned downtime");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"white",vtMissing);
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarColor,long(8421504));
	var_Items->PutItemBar(h,"white",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF>Planned downtime");
spG2antt1->EndUpdate();

1641
How do I programmatically exclude items from the filter

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowFocusItem | EXG2ANTTLib::exShowCheckBox));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
	var_Items->AddItem("Item 4");
EXG2ANTTLib::IColumnPtr var_Column1 = spG2antt1->GetColumns()->GetItem(long(0));
	var_Column1->PutFilterType(EXG2ANTTLib::FilterTypeEnum(EXG2ANTTLib::exFilterExclude | EXG2ANTTLib::exFilter));
	var_Column1->PutFilter(L"Item 1|Item 4");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

1640
How do I show in histogram, more values for a single task

// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
void OnBeforeExpandItemG2antt1(long   Item,VARIANT FAR*   Cancel)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	Cancel = VARIANT_TRUE;
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_TRUE);
spG2antt1->PutExpandOnDblClick(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(167);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutHistogramView(EXG2ANTTLib::HistogramViewEnum(EXG2ANTTLib::exHistogramNoGrouping | EXG2ANTTLib::exHistogramUnlockedItems));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistCumulative);
		var_Bar->PutHistogramItems(6);
		var_Bar->PutHistogramPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutHistogramItems(-40000);
		var_Bar->PutHistogramCriticalValue(100000);
		var_Bar->PutHistogramRulerLinesColor(RGB(128,128,128));
		var_Bar->PutHistogramCumulativeColors(3);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Costs")))->PutVisible(VARIANT_FALSE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")))->PutVisible(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Estimated");
	var_Items->PutCellValue(h,long(1),"Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,long(8000));
	long hR = var_Items->InsertItem(h,vtMissing,"Actual");
	var_Items->AddBar(hR,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(hR,"",EXG2ANTTLib::exBarEffort,long(9000));
	var_Items->GroupBars(h,"",VARIANT_TRUE,hR,"",VARIANT_TRUE,vtMissing,vtMissing);
	var_Items->GroupBars(h,"",VARIANT_FALSE,hR,"",VARIANT_FALSE,vtMissing,vtMissing);
	hR = var_Items->InsertItem(h,vtMissing,"Cost");
	var_Items->AddBar(hR,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(hR,"",EXG2ANTTLib::exBarEffort,long(200));
	var_Items->GroupBars(h,"",VARIANT_TRUE,hR,"",VARIANT_TRUE,vtMissing,vtMissing);
	var_Items->GroupBars(h,"",VARIANT_FALSE,hR,"",VARIANT_FALSE,vtMissing,vtMissing);
	h = var_Items->AddItem("Estimated");
	var_Items->PutCellValue(h,long(1),"Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,long(7000));
	hR = var_Items->InsertItem(h,vtMissing,"Actual");
	var_Items->AddBar(hR,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(hR,"",EXG2ANTTLib::exBarEffort,long(8000));
	var_Items->GroupBars(h,"",VARIANT_TRUE,hR,"",VARIANT_TRUE,vtMissing,vtMissing);
	var_Items->GroupBars(h,"",VARIANT_FALSE,hR,"",VARIANT_FALSE,vtMissing,vtMissing);
	hR = var_Items->InsertItem(h,vtMissing,"Cost");
	var_Items->AddBar(hR,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(hR,"",EXG2ANTTLib::exBarEffort,long(150));
	var_Items->GroupBars(h,"",VARIANT_TRUE,hR,"",VARIANT_TRUE,vtMissing,vtMissing);
	var_Items->GroupBars(h,"",VARIANT_FALSE,hR,"",VARIANT_FALSE,vtMissing,vtMissing);
spG2antt1->EndUpdate();

1639
How can I align the caption of the bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,25,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","exBarHAlignCaption = 0");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(0));
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","exBarHAlignCaption = 1");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(1));
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","exBarHAlignCaption = 2");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(2));
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","Clip 3");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(3));
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","Clip 4");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(4));
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","Clip 5");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(5));
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","Outside Left 16");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(16));
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","Outside Right 18");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(18));
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K","Outside Center 17");
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarHAlignCaption,long(17));
spG2antt1->EndUpdate();

1638
How can I change the drop down filter background color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutBackground(EXG2ANTTLib::exBackColorFilter,RGB(255,255,255));
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowFocusItem | EXG2ANTTLib::exShowCheckBox | EXG2ANTTLib::exSortItemsAsc | EXG2ANTTLib::exLeafItems));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1637
How can I arrange the columns using CRD (eXCRD ) strings (Sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutDefaultItemHeight(36);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C1")));
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutWidth(18);
		var_Column->PutAllowSizing(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C2")));
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutWidth(18);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column1")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column2")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column3")))->PutVisible(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"FormatLevel")));
		var_Column2->PutFormatLevel(L"18;\"Info\"[a=17]/(2/3,4)");
		var_Column2->PutDef(EXG2ANTTLib::exCellFormatLevel,"2/3,4");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2014,6,22,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Cell 1.1");
	var_Items->PutCellValue(h,long(1),"Cell 1.2");
	var_Items->PutCellValue(h,long(2),"Cell 1.3");
	var_Items->AddBar(h,"Task",COleDateTime(2014,6,23,0,00,00).operator DATE(),COleDateTime(2014,6,25,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Cell 2.1");
	var_Items->PutCellValue(h,long(1),"Cell 2.2");
	var_Items->PutCellValue(h,long(2),"Cell 2.3");
	var_Items->AddBar(h,"Task",COleDateTime(2014,6,26,0,00,00).operator DATE(),COleDateTime(2014,6,28,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1636
How can I arrange the columns using CRD (eXCRD ) strings (Sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutDefaultItemHeight(36);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column1")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column2")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column3")))->PutVisible(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"FormatLevel")));
		var_Column->PutFormatLevel(L"(0/1),2");
		var_Column->PutDef(EXG2ANTTLib::exCellFormatLevel,var_Column->GetFormatLevel());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2014,6,22,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Cell 1.1");
	var_Items->PutCellValue(h,long(1),"Cell 1.2");
	var_Items->PutCellValue(h,long(2),"Cell 1.3");
	var_Items->AddBar(h,"Task",COleDateTime(2014,6,23,0,00,00).operator DATE(),COleDateTime(2014,6,25,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Cell 2.1");
	var_Items->PutCellValue(h,long(1),"Cell 2.2");
	var_Items->PutCellValue(h,long(2),"Cell 2.3");
	var_Items->AddBar(h,"Task",COleDateTime(2014,6,26,0,00,00).operator DATE(),COleDateTime(2014,6,28,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1635
How do I display the histogram for filtered items only
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(32);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramFilteredItems);
	var_Chart->GetBars()->GetItem("Task")->PutHistogramPattern(EXG2ANTTLib::exPatternBDiagonal);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilter(L"Item 1");
	var_Column->PutFilterType(EXG2ANTTLib::exFilter);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

1634
How can I use no scroll bars for touch-screens

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->ShowToolTip(L"<font ;6><sha ;;0><off -4>Tip</off></sha></font> If the cursor hovers bars, click and wait for a second to start scrolling.",vtMissing,vtMissing,vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
	var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragScroll);
spG2antt1->PutScrollWidth(4);
spG2antt1->PutScrollHeight(4);
spG2antt1->PutBackground(EXG2ANTTLib::exHSLeft,RGB(192,192,192));
spG2antt1->PutBackground(EXG2ANTTLib::exHSRight,RGB(192,192,192));
spG2antt1->PutBackground(EXG2ANTTLib::exHSBack,RGB(224,224,224));
spG2antt1->PutBackground(EXG2ANTTLib::exHSThumb,RGB(128,128,128));
spG2antt1->PutBackground(EXG2ANTTLib::exVSBack,RGB(224,224,224));
spG2antt1->PutBackground(EXG2ANTTLib::exVSDown,RGB(192,192,192));
spG2antt1->PutBackground(EXG2ANTTLib::exVSThumb,RGB(128,128,128));
spG2antt1->PutBackground(EXG2ANTTLib::exVSUp,RGB(192,192,192));
spG2antt1->PutScrollButtonWidth(0);
spG2antt1->PutScrollButtonHeight(0);
spG2antt1->EndUpdate();

1633
How can I display values in the histogram legend

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Effort")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(21));
	var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(128);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramCriticalValue(3);
		var_Bar->PutHistogramItems(-7);
		var_Bar->PutHistogramGridLinesColor(RGB(192,192,192));
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,23,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(4));
	h1 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,24,0,00,00).operator DATE(),COleDateTime(2005,6,26,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(3));
	h1 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,6,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(2));
	h1 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,30,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(1));
spG2antt1->EndUpdate();

1632
I am using AllowGroupBy property and calling the Column.SortOrder property groups by that column. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's GroupBy bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"First");
	var_Columns->Add(L"Second");
	var_Columns->Add(L"Third");
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutLayout(L"SingleSort = \"C0:1\";MultipleSort = \"C1:2 C2:1\"");

1631
Calling programatically the Column.SortOrder property adds the column to the sort bar. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's Sort bar
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"First");
	var_Columns->Add(L"Second");
	var_Columns->Add(L"Third");
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutLayout(L"SingleSort = \"C0:1\"");

1630
How can I specify different working parts for different items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Working")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"A");
		var_Column->PutFormatColumn(L"(0:=round(value*24)) != 0 ? =:0 : ''");
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"NonWorking")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(259));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"A");
		var_Column1->PutFormatColumn(L"(0:=round(value*24)) != 0 ? =:0 : ''");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,78);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutDrawLevelSeparator(EXG2ANTTLib::exLevelNoLine);
	var_Chart->PutLevelCount(3);
	var_Chart->GetLevel(1)->PutDrawGridLines(VARIANT_FALSE);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->PutDrawDateTicker(VARIANT_TRUE);
	var_Chart->PutDateTickerLabel(L"<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>");
	var_Chart->PutMarkSelectDateColor(0x7ffff8ee);
	EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
		var_InsideZoomFormat->PutOwnerLabel(L"<%mmm%> <%d%>");
		var_InsideZoomFormat->PutBackColor(RGB(238,248,255));
		var_InsideZoomFormat->PutBackColorChart(var_InsideZoomFormat->GetBackColor());
		var_InsideZoomFormat->PutInsideCount(4);
		var_InsideZoomFormat->PutInsideLabel(L"<b><%hh%></b>");
	var_Chart->GetInsideZooms()->Add(COleDateTime(2005,6,22,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exVLines);
	var_Chart->GetBars()->GetItem("Split")->PutColor(RGB(255,0,0));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutColor(RGB(255,0,0));
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBDiagonal);
		var_Bar->PutShortcut(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,22,8,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	var_Items->PutItemNonworkingUnits(h1,VARIANT_FALSE,L"weekday(value) in (1,2)");
	var_Items->PutItemNonworkingUnits(h1,VARIANT_TRUE,L"weekday(value) in (1,2) or (hour(value)<8 or hour(value)>=16 )");
	long h2 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h2,"Task",COleDateTime(2005,6,22,4,00,00).operator DATE(),COleDateTime(2005,6,29,12,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h2,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	var_Items->PutItemNonworkingUnits(h2,VARIANT_FALSE,L"weekday(value) in (1,2)");
	var_Items->PutItemNonworkingUnits(h2,VARIANT_TRUE,L"weekday(value) in (1, 2) or (hour(value)<4 or hour(value)>=12 )");
spG2antt1->EndUpdate();

1629
How can I define the default bar's foreground color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHeight(15);
		var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutDef(EXG2ANTTLib::exBarForeColor,long(16777215));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1","bar A");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2","bar B");
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3","bar C");
spG2antt1->EndUpdate();

1628
How can I print the selected items only

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutSelectItem(var_Items->GetItemByIndex(0),VARIANT_TRUE);
	var_Items->PutSelectItem(var_Items->GetItemByIndex(2),VARIANT_TRUE);
	var_Items->PutSelectItem(var_Items->GetItemByIndex(4),VARIANT_TRUE);
spG2antt1->EndUpdate();
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutOptions("Print = Selection");
	var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
	var_Print->Preview();

1627
How can I sort the columns to be displayed on the columns floating bar
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"City")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutVisible(VARIANT_FALSE);
spG2antt1->PutColumnsFloatBarVisible(EXG2ANTTLib::exColumnsFloatBarVisibleIncludeHiddenColumns);
spG2antt1->PutColumnsFloatBarSortOrder(EXG2ANTTLib::SortAscending);

1626
How can I add a vertical padding for my cells
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Padding")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
	var_Column->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(6));
	var_Column->PutDef(EXG2ANTTLib::exCellPaddingRight,long(6));
	var_Column->PutDef(EXG2ANTTLib::exCellPaddingTop,long(6));
	var_Column->PutDef(EXG2ANTTLib::exCellPaddingBottom,long(6));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("padding");
	var_Items->AddItem("padding");
spG2antt1->EndUpdate();

1625
Trying to fill the second columns. How can I do that
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Column 1");
	var_Columns->Add(L"Column 2");
	var_Columns->Add(L"Column 3");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("SubItem 1.1");
	var_Items->PutCellValue(h,long(1),"SubItem 1.2");
	var_Items->PutCellValue(h,long(2),"SubItem 1.3");
	h = var_Items->AddItem("SubItem 2.1");
	var_Items->PutCellValue(h,long(1),"SubItem 2.2");
	var_Items->PutCellValue(h,long(2),"SubItem 2.3");
spG2antt1->EndUpdate();

1624
How can I specify a different background color for item, in chart or list panels

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	long hC = var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->PutItemBackColor(hC,RGB(255,0,0));
	spG2antt1->GetChart()->PutItemBackColor(hC,RGB(0,255,0));
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);

1623
Is it possible to specify a status part for each bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,64);
spG2antt1->PutDebug(VARIANT_TRUE);
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAChABL8IQAAYAQGKIaBwAKBQAGaAoDDQNgyQwAAxwdBMKgBBCLIxhEYobgmGIaRjHcQjEKoSxHEqIRpGCRoJiqLIZAJIEZRZAcaQvGSQYRASCRN") +
"DEOA0TDAY4jPD4aQiGIbRjjeL5YjiNo2UxTNRQCEB");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,17,0,00,00).operator DATE(),"B2",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarColor,long(255));
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarFrameColor,long(16777216));
spG2antt1->EndUpdate();

1622
How can I change the the focus rectangle

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"C:\\Program Files\\Exontrol\\ExG2antt\\sample\\EBN\\hoverinsert.ebn");
spG2antt1->PutBackground(EXG2ANTTLib::exShowFocusRect,0x1000000);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")));
	var_Column->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(2));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
spG2antt1->PutSelForeColor(spG2antt1->GetForeColor());
spG2antt1->PutSelBackColor(spG2antt1->GetBackColor());
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutShowFocusRect(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	var_Items->AddItem("");
spG2antt1->EndUpdate();

1621
Can each cell have their own dropdown lists that contain "different list item values" for each cell, not predefined for the entire column
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column/Cell-Same")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->AddItem(0,L"Zero",vtMissing);
	var_Editor->AddItem(1,L"One",vtMissing);
	var_Editor->AddItem(2,L"Two",vtMissing);
EXG2ANTTLib::IEditorPtr var_Editor1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column/Cell-Different")))->GetEditor();
	var_Editor1->PutEditType(EXG2ANTTLib::EditType);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(vtMissing);
	long h = var_Items->AddItem(long(0));
	EXG2ANTTLib::IEditorPtr var_Editor2 = var_Items->GetCellEditor(h,long(1));
		var_Editor2->PutEditType(EXG2ANTTLib::DropDownListType);
		var_Editor2->AddItem(3,L"Three",vtMissing);
		var_Editor2->AddItem(4,L"Four",vtMissing);
	var_Items->PutCellValue(h,long(1),long(3));
	var_Items->AddItem(vtMissing);
	h = var_Items->AddItem(long(0));
	EXG2ANTTLib::IEditorPtr var_Editor3 = var_Items->GetCellEditor(h,long(1));
		var_Editor3->PutEditType(EXG2ANTTLib::CheckListType);
		var_Editor3->AddItem(1,L"Single",vtMissing);
		var_Editor3->AddItem(2,L"Double",vtMissing);
	var_Items->PutCellValue(h,long(1),long(3));
spG2antt1->EndUpdate();

1620
How can I specify just a few fonts in a FontType editor
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Fonts")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::FontType);
	var_Editor->ClearItems();
	var_Editor->AddItem(0,L"Calibri",vtMissing);
	var_Editor->AddItem(1,L"Arial",vtMissing);
	var_Editor->AddItem(2,L"Rockwell",vtMissing);
	var_Editor->AddItem(3,L"Tahoma",vtMissing);
	var_Editor->SortItems(VARIANT_TRUE,vtMissing);
	var_Editor->PutDropDownRows(4);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Tahoma");
spG2antt1->EndUpdate();

1619
How can I show only the working-hours in chart and histogram panels

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(64);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutLevelCount(3);
	var_Chart->PutNonworkingHours(16253183);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverAllocation);
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutShowNonworkingHours(VARIANT_FALSE);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutUnitWidth(4);
	var_Chart->PutResizeUnitScale(var_Chart->GetUnitScale());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task A");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,23,11,00,00).operator DATE(),COleDateTime(2005,6,23,12,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"0.0416666");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	h = var_Items->AddItem("Task B");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,23,12,00,00).operator DATE(),COleDateTime(2005,6,23,16,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"0.0416666");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
spG2antt1->EndUpdate();

1618
How do you embed HTML options into the anchor click string
// AnchorClick event - Occurs when an anchor element is clicked.
void OnAnchorClickG2antt1(LPCTSTR   AnchorID,LPCTSTR   Options)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"AnchorID" );
	OutputDebugStringW( L"Options" );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Car")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("<a mazda_1;options for 1>Mazda <b>1</b></a>");
	var_Items->AddItem("<a mazda_2;options for 2>Mazda <b>2</b></a>");
	var_Items->AddItem("<a mazda_3;options for 3a>Mazda <b>3.a</b></a>");
	var_Items->AddItem("<a mazda_3;options for 3b>Mazda <b>3.b</b></a>");
spG2antt1->EndUpdate();

1617
How do I add a checkbox column (method 2)

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"CheckBox Changed:" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetCellState(Item,ColIndex)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Check 1"),long(0),0);
	var_Items->PutCellState(var_Items->AddItem("Check 2"),long(0),1);
	var_Items->PutCellState(var_Items->AddItem("Check 3"),long(0),0);
	var_Items->PutCellState(var_Items->AddItem("Check 4"),long(0),1);
spG2antt1->EndUpdate();

1616
How do I add a checkbox column (method 1)

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"CheckBox Changed:" );
	OutputDebugStringW( L"NewValue" );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")));
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::CheckValueType);
		var_Editor->PutOption(EXG2ANTTLib::exCheckValue2,long(1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(long(0));
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(0));
	var_Items->AddItem(long(1));
spG2antt1->EndUpdate();

1615
How do I change the progress bar's appearance

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,"c:\\exontrol\\images\\normal.ebn");
	var_Appearance->Add(2,"c:\\exontrol\\images\\pushed.ebn");
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Progress")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::ProgressBarType);
	var_Editor->PutOption(EXG2ANTTLib::exProgressBarBackColor,long(16777216));
	var_Editor->PutOption(EXG2ANTTLib::exProgressBarMarkTicker,long(33554432));
spG2antt1->GetItems()->AddItem(long(33));

1614
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78e") +
"gBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRx" +
"LC8Mw3BDvYDkOAABAIgI=");
spG2antt1->PutSelBackColor(0x1fffffe);
spG2antt1->PutSelForeColor(RGB(0,0,0));
spG2antt1->PutSelBackColor(0x1000000);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Items");
spG2antt1->PutDefaultItemHeight(22);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutItemBackColor(var_Items->AddItem("red"),RGB(255,0,0));
	var_Items->PutItemBackColor(var_Items->AddItem("blue"),RGB(0,0,255));
	var_Items->PutItemBackColor(var_Items->AddItem("green"),RGB(0,255,0));
spG2antt1->EndUpdate();

1613
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Items");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutItemBackColor(var_Items->AddItem("red"),RGB(255,0,0));
	var_Items->PutItemBackColor(var_Items->AddItem("blue"),RGB(0,0,255));
	var_Items->PutItemBackColor(var_Items->AddItem("green"),RGB(0,255,0));
spG2antt1->EndUpdate();

1612
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackColor(spG2antt1->GetBackColor());
spG2antt1->PutSelForeColor(spG2antt1->GetForeColor());
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutShowFocusRect(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Items");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutItemBackColor(var_Items->AddItem("red"),RGB(255,0,0));
	var_Items->PutItemBackColor(var_Items->AddItem("blue"),RGB(0,0,255));
	var_Items->PutItemBackColor(var_Items->AddItem("green"),RGB(0,255,0));
spG2antt1->EndUpdate();

1611
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that

// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
void OnBeforeExpandItemG2antt1(long   Item,VARIANT FAR*   Cancel)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"BeforeExpandItem" );
	OutputDebugStringW( L"Item" );
	spG2antt1->GetItems()->InsertItem(Item,vtMissing,"new child");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Items")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilterList(EXG2ANTTLib::exRootItems);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutItemHasChildren(var_Items->InsertItem(vtMissing,vtMissing,"Group 1"),VARIANT_TRUE);
	var_Items->PutItemHasChildren(var_Items->InsertItem(vtMissing,vtMissing,"Group 2"),VARIANT_TRUE);
spG2antt1->EndUpdate();

1610
How can identify when I clicked Hour, Month, or Year of the time-scale overview

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
void OnOverviewZoomG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"UnitScale: " );
	OutputDebugStringW( _bstr_t(spG2antt1->GetChart()->GetUnitScale()) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);

1609
How can define a minimum and maximum in a column SpinType
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"SpinType between 5 and 150")))->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::SliderType);
		var_Editor->PutNumeric(EXG2ANTTLib::exInteger);
		var_Editor->PutOption(EXG2ANTTLib::exSliderWidth,long(0));
		var_Editor->PutOption(EXG2ANTTLib::exSliderMin,long(5));
		var_Editor->PutOption(EXG2ANTTLib::exSliderMax,long(150));
spG2antt1->GetItems()->AddItem(long(50));

1608
How I can change the title of the time-scale overview. (Example: Month by 'Mes', Day by 'Dia')

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);
	var_Chart->PutOverviewZoomCaption(L"Aņo|||Mes|||Dia|||");
	var_Chart->PutLabel(EXG2ANTTLib::exHalfYear,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exQuarterYear,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exThirdMonth,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exWeek,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exMinute,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exSecond,L"");

1607
Is it possible to set a fixed wide for the Items List Arrea, so that when changing the Form.width, the Items List Arrea be constant and therefor changing the Chart Area-wide
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart);

1606
How can I clear the colors for all bars at once
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,64);
spG2antt1->PutDebug(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarColor,long(65280));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,17,0,00,00).operator DATE(),"B2",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarColor,long(0));
spG2antt1->EndUpdate();

1605
How can I change the colors for all bars at once
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,64);
spG2antt1->PutDebug(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,17,0,00,00).operator DATE(),"B2",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarColor,long(255));
spG2antt1->EndUpdate();

1604
How can I show my custom bars in the histogram (method 3)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(64);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistCumulative);
		var_Bar->PutHistogramItems(6);
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exKeepOriginalColor);
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsOffset);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Item 3");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(255));
spG2antt1->EndUpdate();

1603
How can I show my custom bars in the histogram (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(32);
	var_Chart->GetBars()->GetItem("Task")->PutHistogramPattern(EXG2ANTTLib::exPatternBDiagonal);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Item 3");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(255));
spG2antt1->EndUpdate();

1602
How can I show my custom bars in the histogram (method 1)
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(32);
	var_Chart->GetBars()->GetItem("Task")->PutHistogramPattern(EXG2ANTTLib::exPatternBDiagonal);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Task",L"MyBar");
		var_Bar->PutHistogramPattern(EXG2ANTTLib::exPatternFDiagonal);
		var_Bar->PutColor(RGB(255,0,0));
		var_Bar->PutHistogramColor(var_Bar->GetColor());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"MyBar",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1601
Do you have any Fit-To-Page options when printing the control

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
spG2antt1->EndUpdate();
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutOptions("FitToPage = On");
	var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
	var_Print->Preview();